package com.ang.publishEvent.t1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserInfoController {
    @Autowired
    ApplicationContext applicationContext;

    @RequestMapping("test/publish1")
    public void publish() {

        applicationContext.publishEvent(new UserInfo1("publish1","123456"));

    }
}
